/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dao;

import entidades.Administrador;
import java.util.List;

/**
 *
 * @author Tarde
 */
public class DaoAdministrador extends Dao<Administrador>{
    public DaoAdministrador() {
        super(Administrador.class);
    }
    public List<Administrador> buscaLogin(String login) {
        return getEm().createQuery("SELECT e FROM "+Administrador.class.getSimpleName()+" e WHERE e.login="+login).getResultList();
                
    }
    
    public List<Administrador> buscaLoginSenha(String login, String senha){
        return getEm().createQuery("SELECT e FROM "+Administrador.class.getSimpleName()+" e WHERE e.login=\""+login+"\" and e.senha=\""+senha+"\"").getResultList();
        
    } 
}
